package com.yh.supergo.sso.controller;

import com.yh.supergo.http.HttpResult;
import com.yh.supergo.user.pojo.UserInfo;
import com.yh.supergo.sso.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName UserController
 * @Description 控制器
 * @Author 0715-YuHao
 * @Date 2020/11/25 16:59
 */
@RestController
@RequestMapping("/user")
public class UserController {

    @Autowired
    private UserService userService;

    @PostMapping("/doLogin")
    public HttpResult doLogin(@RequestBody UserInfo userInfo) {
        return userService.doLogin(userInfo);
    }
}
